Previous Book Contents Book Index Next

Inside Macintosh: QuickTime /
Chapter 2 - Movie Toolbox / Movie Toolbox Reference
Functions That Modify Movie Properties / Working With Track Time


TrackTimeToMediaTime

The TrackTimeToMediaTime function allows your application to convert a track's time value to a time value that is appropriate to the track's media using the track's edit list. You specify the track's time in the movie's time coordinate system.

pascal TimeValue TrackTimeToMediaTime (TimeValue value, 
                                       Track theTrack);
value
Specifies the track's time value; must be expressed in the time scale of the movie that contains the track.
theTrack
Specifies the track for this operation. Your application obtains this track identifier from such Movie Toolbox functions as NewMovieTrack and GetMovieTrack (described on page 2-136 and page 2-188, respectively).
DESCRIPTION
The Movie Toolbox returns a value that is in the media's time coordinate system.

You can use the TrackTimeToMediaTime function to determine whether a specified track edit is empty. If the track time corresponds to empty space, this function returns a value of -1.

The TrackTimeToMediaTime function maps the track time through the track's edit list to come up with the media time. This time value contains the track's time value according to the media's time coordinate system. If the time you specified lies outside of the movie's active segment or corresponds to empty space in the track, the TrackTimeToMediaTime function returns a value of -1.

ERROR CODES
invalidTrack-2009This track is corrupted or invalid

Previous Book Contents Book Index Next

© Apple Computer, Inc.
6 JUL 1996